-# Automatically generated makefile, created by the Introjucer
-# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!
+# build a dynamic library for juce
+prefix = /usr/local
+libdir = $(prefix)/lib
+includedir = $(prefix)/include
# (this disables dependency generation if multiple architectures are set)
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
empty=
-MODULES_PATH=../../modules
+JUCE_PATH=../..
+MODULES_PATH=$(JUCE_PATH)/modules
SOURCES=juce_audio_basics.cpp \
juce_audio_devices.cpp \
OBJECTS=$(SOURCES:%.cpp=$(OBJDIR)/%.o)
-.PHONY: clean install test
+.PHONY: clean install install-lib install-headers test
$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES)
@echo Linking juce_dll
@echo Cleaning juce_dll
rm -rf build
+install-lib: $(OUTDIR)/$(TARGET)
+ @echo Installing juce_dll
+ install -d $(DESTDIR)$(libdir)
+ install -m664 $^ $(DESTDIR)$(libdir)/libjuce.so
+install-headers:
+ @echo Installing juce_dll
+ install -d $(DESTDIR)$(includedir)/juce
+ cd $(JUCE_PATH) && find modules/ -type f -name "juce_*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \;
+ cd $(JUCE_PATH) && find modules/juce_box2d/box2d/ -type f -name "*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \;
+
+install: install-headers install-lib
+
-include $(OBJECTS:%.o=%.d)
test: